package easy;

public class Solution_1876 {
    public int countGoodSubstrings(String s) {
        int count = 0;
        char[] chars = s.toCharArray();
        for (int i = 0; i < s.length()-2; i++) {
            if (chars[i] != chars[i+1] && chars[i] != chars[i+2] && chars[i+2] != chars[i+1]) {
                count++;
            }
        }
        return count;
    }
}
